<template>
    <div class="m-hight">

        <el-menu
                default-active="1"
                class="el-menu-vertical-demo"
                @open="handleOpen"
                @close="handleClose">
            <el-menu-item index="1" @click="toActive(1)">
                <i class="el-icon-menu"></i>
                <span slot="title" >大数据</span>
            </el-menu-item>
            <el-menu-item index="2" @click="toActive(2)">
                <i class="el-icon-menu"></i>
                <span slot="title">商品管理</span>
            </el-menu-item>
            <el-menu-item index="3" @click="toActive(3)">
                <i class="el-icon-document"></i>
                <span slot="title">分类管理</span>
            </el-menu-item>
            <el-menu-item index="4" @click="toActive(4)">
                <i class="el-icon-setting"></i>
                <span slot="title">订单管理</span>
            </el-menu-item>
            <el-menu-item index="5" @click="toActive(5)">
                <i class="el-icon-user"></i>
                <span slot="title">个人信息</span>
            </el-menu-item>
        </el-menu>

    </div>
</template>

<script>
    export default {
        name: "Menus",
        methods: {
            handleOpen(key, keyPath) {
                console.log(key, keyPath);
            },
            handleClose(key, keyPath) {
                console.log(key, keyPath);
            },
            toEcharts() {
                console.log("aaaa")
                this.$router.push('/admin/echarts');
            },
            toActive(active) {
                this.$emit("changeActive", active)

            }
        }

    }
</script>

<style scoped>
    .m-hight {
        height: 940px;
    }
</style>
